x86: Clean up APIC local timer handling.
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 3 Nov 2009 09:33:22 +0000 (09:33 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 3 Nov 2009 09:33:22 +0000 (09:33 +0000)
commitb95beb185810484d5afe91b994d2c2d1670af74c
treedf43239616fdab10f7593af4deb1509b397f50e8
parentad1f74192ab40866396316cd86bec3f98b6ef56b
x86: Clean up APIC local timer handling.

1. Writing TMICT=0 disables the timer. Use this fact to simplify and
improve reprogram_timer(). In particular, we always write TMICT, and
write zero when we do not need a timer interrupt.

2. In HPET broadcast timer handler, set TMICT=0 when we mask the APIC
local timer. May as well do this early, before entering deep sleep.

3. In HVM-guest APIC emulation, disable the emulated local timer when
the guest sets TMICT=0. Previously we would issue an immediate
one-shot interrupt.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen/arch/x86/apic.c
xen/arch/x86/hpet.c
xen/arch/x86/hvm/vlapic.c